<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  mounted () {
    this.$nextTick(() => {
      this.autoRootFontSize()
      window.addEventListener('resize', this.autoRootFontSize)
    })
  },
  methods: {
    autoRootFontSize () { // 缩放自适应
      const screenWidth = Math.min(screen.width, document.documentElement.getBoundingClientRect().width)
      document.querySelector('body').style.zoom = screenWidth / 1920
    }
  }
}
</script> 
<style lang="less" scoped>
  #app {
    height:100%;
    min-width: 1366px;
    margin:0;
  }
</style>